package com.monitor.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.monitor.entity.ErpSystemParametersChild;

/**
 * <p>
 * 系统参数子表 Mapper 接口
 * </p>
 *
 * @author LX
 * @since 2018-09-08
 */
public interface ErpSystemParametersChildMapper extends BaseMapper<ErpSystemParametersChild> {
	@Select("select * from erp_system_parameters_child spc where spc.pid=#{pid}")
	public List<ErpSystemParametersChild> selectByPid(@Param("pid")int pid);
	
	@Select("SELECT `name` FROM erp_system_parameters_child WHERE pId=#{pid}")
	public List<String> selectStringListByPid(@Param("pid")int pid);
	
	@Select("SELECT * FROM erp_system_parameters_child WHERE `name`=#{name} limit 0,1")
	public ErpSystemParametersChild selectByName(@Param("name")String name);
}
